import Layout from "@/layout";

const BaseManageRouter = {
  path: "/base-manage",
  component: Layout,
  redirect: "noRedirect",
  name: "BaseManage",
  meta: { title: "基地管理", icon: "system-settings" },
  children: [
    {
      path: "select-base-manage",
      name: "selectBaseManage",
      component: () =>
        import("@/views/production-operation-maintenance/base-manage/select-base/index"),
      meta: { title: "选择基地", icon: "category-management" }
    },
    {
      path: "base-system-management",
      name: "baseSystemManagement",
      // component: () =>
      // import("@/views/production-operation-maintenance/basic-info-manage/functional-audit/index"),
      component: { render(c) { return c('router-view') } },
      redirect: 'base-system-management',
      meta: { title: "基地&系统", icon: "agricultural-type-management" },
      children: [
        {
          path: "system-configuration",
          name: "SystemConfiguration",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-system-management/system-configuration/index"),
          meta: { title: "系统配置", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "system-binding-function",
          name: "systemBindingFunction",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-system-management/system-binding-function/index"),
          meta: { title: "系统&功能", hidden: true, icon: "agricultural-type-management" }
        }
      ]
    },
    {
      path: "base-user-manage",
      name: "baseUserManage",
      component: () =>
        import("@/views/production-operation-maintenance/base-manage/base-user-manage/index"),
      meta: { title: "初始用户管理", icon: "category-management" }
    },
    {
      path: "prod-operation-manage",
      name: "baseUserManage",
      component: () =>
        import("@/views/production-operation-maintenance/base-manage/prod-operation-manage/index"),
      meta: { title: "生产作业配置", icon: "agricultural-type-management" }
    },
    {
      path: "base-function-menu-management",
      name: "baseFunctionMenuManagement",
      // component: () =>
      // import("@/views/production-operation-maintenance/basic-info-manage/functional-audit/index"),
      component: { render(c) { return c('router-view') } },
      redirect: 'base-function-menu-management',
      meta: { title: "基地&功能菜单", icon: "agricultural-type-management" },
      children: [
        {
          path: "menu-management",
          name: "menuManagement",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/menu-management/index"),
          meta: { title: "菜单管理", hidden: true, icon: "caidan" }
        },
        {
          path: "function-management",
          name: "FunctionManagement",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/function-management/index"),
          meta: { title: "功能管理", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "page-configuration",
          name: "PageConfiguration",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/page-configuration/index"),
          meta: { title: "页面", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "page-elements",
          name: "PageElements",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/page-elements/index"),
          meta: { title: "页面元素", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "menu-page-management",
          name: "menuPageManagement",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/menu-page-management/index"),
          meta: { title: "菜单&页面", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "function-elements-management",
          name: "functionElementsManagement",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/function-elements-management/index"),
          meta: { title: "功能&元素", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "function-menu-management",
          name: "functionMenuManagement",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/function-menu-management/index"),
          meta: { title: "功能&菜单", hidden: true, icon: "agricultural-type-management" }
        },
        {
          path: "base-field-management",
          name: "baseFieldManagement",
          component: () =>
            import("@/views/production-operation-maintenance/base-manage/base-function-menu-management/base-field-management/index"),
          meta: { title: "字段", hidden: true, icon: "agricultural-type-management" }
        }
      ]
    },
    {
      path: "functional-audit",
      name: "functionalAudit",
      component: () =>
        import("@/views/production-operation-maintenance/base-manage/functional-audit/index"),
      meta: { title: "进销存流程审核", icon: "category-management" }
    },
    {
      path: "collection-failure-record",
      name: "collectionFailureRecord",
      component: () =>
        import("@/views/production-operation-maintenance/base-manage/collection-failure-record/index"),
      meta: { title: "采集失败记录", icon: "category-management" }
    },
    {
      path: "warehouse-management",
      name: "warehouseManagement",
      component: () =>
        import("@/views/production-operation-maintenance/base-manage/warehouse-management/index"),
      meta: { title: "仓库管理", icon: "category-management" }
    }

  ]
};

export default BaseManageRouter;
